<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script language="javascript" type="text/javascript" src="<%=path%>/My97DatePicker/WdatePicker.js"></script>
<script language="javascript" type="text/javascript" src="<%=path%>/js/jquery-1.9.1.min.js"/></script>
<script>
	function chooseCar(){
		var res=window.showModalDialog('<%=basePath%>/manage/inputmessage/inputmessage_car_show.jsp',window,'dialogWidth:650px;dialogHeight:425px;status:no;directories:yes;scrollbars:no;help=no;');
		if(res!=undefined){
			$('#carInformitionName').val(res.split(',')[0]);
			$('#carInformitionId').val(res.split(',')[1]);
		}
	}
	function chooseDriver(){
		var res = window.showModalDialog('<%=basePath%>/manage/inputmessage/inputmessage_driver_show_radio.jsp','','dialogWidth:650px;dialogHeight:425px;status:no;directories:yes;scrollbars:no;help=no;');
		if(res!='undefined'){
			$('#driver_id').val(res.split(',')[0]);
			$('#driver_name').val(res.split(',')[1]);
		}
	}
	function check(){
		if($('#carInformitionName').val()==''){
			alert('请选择要绑定的车辆信息')
			return false;
		}else if($('#schoolName').val()==''){
			alert('请选择服务学校')
			return false;
		}else if($('#driver_name').val()==''){
			alert('请选择要绑定的驾驶员信息')
			return false;
		}
		return true;
	}
	$(function(){
		//$('#schoolName').prepend("<option value=''>===请选择===</option>");
		$.post(
			"<%=path%>/ajax/findDicByType.action", 
			{
				dicType: 'DIC_SCHOOL'
			},
			function(json){
				var obj = $.parseJSON(json);
				$.each(obj.dicList,function(commentIndex, comment) {
					var dictype=comment.dictype;
					$('#schoolName').append("<option value='"+comment.dicvalue+"'>"+comment.dicname+"</option>");
				})
			},"text"
		);
	});
		
	var msg="${requestScope.rMsg}";
	if(msg!=""){
		alert(msg);
	}
</script>
<title>Insert title here</title>
<link href="<%=basePath%>/images/css.css" rel="stylesheet" type="text/css">
</head>
<body class="bg_003">
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="201" height="30" align="center" background="<%=basePath%>/images/016.jpg"><table width="75%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="25"><img src="<%=basePath%>/images/1.png" width="16" height="16"></td>
        <td><strong>校车捆绑录入</strong></td>
      </tr>
    </table></td>
    <td align="right" background="<%=basePath%>/images/017.jpg" class="zi_006">校车捆绑录入</td>
    <td width="39"><img src="<%=basePath%>/images/018.jpg" width="39" height="30"></td>
  </tr>
</table>
<form id="addForm" name="addForm" action="<%=path %>/messagecollection/addSchoolCarExtendInformition.action" method="post">
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="1" bgcolor="#e1e1e2"></td>
        <td height="298" align="center"><table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#e1e1e1">
          <tr>
            <td width="15%" height="31" align="right" bgcolor="#f5f5f5"><font color='red'>*</font>车辆信息：</td>
            <td width="35%" height="31" bgcolor="#f5f5f5" align="left">
            <input name="carInformitionName" type="text" id="carInformitionName" size="20" readonly='readonly'>
            <input name="schoolCarExtendInformitionVo.carinformitionid" type="hidden" id="carInformitionId" size="30" >
            <input type="button" name="but1" id="but1" value="选择" onclick='chooseCar()'>
            </td>
            <td width="15%" height="31" align="right" bgcolor="#f5f5f5"><font color='red'>*</font>驾驶员信息：</td>
            <td width="35%" height="31" bgcolor="#f5f5f5" align="left">
            	<input name="driver_name" type="text" id="driver_name" size="30" readonly='readonly'>
            	<input name="driver_id" type="hidden" id="driver_id" size="30" >
            	<input type="button" value="选择" onclick='chooseDriver()'>
            </td>
          </tr>
          <tr>
            <td width="15%" height="31" align="right" bgcolor="#f5f5f5"><font color='red'>*</font>服务学校：</td>
             <td width="35%" height="31" align="left" bgcolor="#f5f5f5">
            	<select name="schoolCarExtendInformitionVo.schoolname" id="schoolName"></select>
            </td>
          	<td width="50%" height="31" align="right" bgcolor="#f5f5f5" colspan="2"></td>
          </tr>
          <tr>
            <td width="15%" height="31" align="right" bgcolor="#f5f5f5">运营时间：</td>
            <td width="35%" height="31" align="left" bgcolor="#f5f5f5">
            	<input name="schoolCarExtendInformitionVo.businesstime" type="text" id="businessTime" size="30" onFocus="WdatePicker({el:this,dateFmt:'yyyy年MM月dd日',maxDate:'#F{\'%y-%M\'}'})">
            </td>
            <td width="15%" height="31" align="right" bgcolor="#f5f5f5">运营区间：</td>
            <td width="35%" height="31" align="left" bgcolor="#f5f5f5">
            	<input name="schoolCarExtendInformitionVo.businessarea" type="text" id="businessArea" size="30">
            </td>
          </tr>
        </table>
          <table width="95%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td height="50" align="center"><input type="submit" name="button" id="button" value=" 提 交 " onclick="return check();"></td>
            </tr>
          </table></td>
        <td width="1" bgcolor="#e1e1e2"></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="5" height="5"><img src="<%=basePath%>/images/019.jpg" width="5" height="5"></td>
        <td width="100%" height="5" class="bg_002"></td>
        <td width="5" height="5"><img src="<%=basePath%>/images/020.jpg" width="5" height="5"></td>
      </tr>
    </table></td>
  </tr>
</table>
</form>
<table width="603" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="26">&nbsp;</td>
  </tr>
</table>
</body>

</html>